<% layout('/layouts/default.html', {title: '', bodyClass: ''}){ %>
<!-- <link rel="stylesheet" href="${ctxStatic}/modules/sys/sysDesktop.css?${_version}"> -->
<div class="content pb0">
	<!-- Info boxes -->
	<div class="row">
		<div class="col-md-3 col-sm-6 col-xs-12">
			<div class="info-box">
				<span class="info-box-icon bg-aqua"><i class="fa fa-cog"></i></span>
				<div class="info-box-content">
					<span class="info-box-text">直属代理商/所有代理商</span>
					<span class="info-box-number">${findCount}<small>/</small>${allFindCount}</span>
				</div>
			</div>
		</div>
		<div class="col-md-3 col-sm-6 col-xs-12">
			<div class="info-box">
				<span class="info-box-icon bg-red"><i class="fa fa-google-plus"></i></span>
				<div class="info-box-content">
					<span class="info-box-text">直属广告主/所有广告主</span>
					<span class="info-box-number">${adVertiserFindCount}<small>/</small>${adVertiserFindCountAll}</span>
				</div>
			</div>
		</div>

		<!-- fix for small devices only -->
		<div class="clearfix visible-sm-block"></div>

		<div class="col-md-3 col-sm-6 col-xs-12">
			<div class="info-box">
				<span class="info-box-icon bg-green"><i class="fa fa-internet-explorer"></i></span>
				<div class="info-box-content">
					<span class="info-box-text">广告计划</span>
					<span class="info-box-number">${adAllCount}</span>
				</div>
			</div>
		</div>
		<div class="col-md-3 col-sm-6 col-xs-12">
			<div class="info-box">
				<span class="info-box-icon bg-yellow"><i class="fa fa-users"></i></span>

				<div class="info-box-content">
					<span class="info-box-text">获客量</span>
					<span class="info-box-number">${adGuestFindCount}</span>
				</div>
			</div>
		</div>
	</div>
	<!-- Chart boxes -->
	<div class="row">
		<div class="col-md-12">
			<div class="box box-widget">
				<div class="box-header with-border">
					<h3 class="box-title">时间周期： <span style="border: 1px solid black;">${startDate}</span>-<span style="border: 1px solid black;">${endDate}</span></h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
						<button type="button" class="btn btn-box-tool" data-widget="remove">
							<i class="fa fa-times"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
					<div class="row">
						<div class="col-md-12">
							<div class="chart">
								<div id="container" style="height: 400px;width: 99%;"></div>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/dataTool.min.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
								<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script>
								<script type="text/javascript">
									var dom = document.getElementById("container");
									var myChart = echarts.init(dom);
									var app = {};
									var adExposureNum = ${adExposureNum};
									var adClickNum = ${adClickNum};
									var ldShowNum = ${ldShowNum};
									var count = ${count};
									var date = ${censusDate};
									option = null;
									option = {
									    title: {
									        text: '投放结果展示图'
									    },
									    tooltip : {
									        trigger: 'axis',
									        axisPointer: {
									            type: 'cross',
									            label: {
									                backgroundColor: '#6a7985'
									            }
									        }
									    },
									    legend: {
									        data:['广告曝光量','广告点击量','落地页展示量','获客数量']
									    },
									    toolbox: {
									        feature: {
									            saveAsImage: {}
									        }
									    },
									    grid: {
									        left: '3%',
									        right: '4%',
									        bottom: '3%',
									        containLabel: true
									    },
									    xAxis : [
									        {
									            type : 'category',
									            boundaryGap : false,
									            data : date
									        }
									    ],
									    yAxis : [
									        {
									            type : 'value'
									        }
									    ],
									    series : [
									        {
									            name:'广告曝光量',
									            type:'line',
									            stack: '总量',
									            areaStyle: {},
									            data:adExposureNum
									        },
									        {
									            name:'广告点击量',
									            type:'line',
									            stack: '总量',
									            areaStyle: {},
									            data:adClickNum
									        },
									        {
									            name:'落地页展示量',
									            type:'line',
									            stack: '总量',
									            areaStyle: {normal: {}},
									            data:ldShowNum
									        },
									        {
									            name:'获客数量',
									            type:'line',
									            stack: '总量',
									            label: {
									                normal: {
									                    show: true,
									                    position: 'top'
									                }
									            },
									            areaStyle: {normal: {}},
									            data:count
									        }
									    ]
									};
									;
									if (option && typeof option === "object") {
									    myChart.setOption(option, true);
									}
							    </script>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<footer class="main-footer m0">
	<div class="pull-right hidden-xs">当前版本： ${@Global.getConfig('productVersion')}</div>
	&copy; ${@DateUtils.getYear()} ${@Global.getConfig('productName')} - Powered By <a href="${@Global.getConfig('poweredByHref')}">${@Global.getConfig('poweredBy')}</a>
</footer>
<% } %>
<script>
$(window).resize(function(){
	var footerHeight  = $('.main-footer').outerHeight() || 0;
	var windowHeight  = $(window).height();
	$('.content').css('min-height', windowHeight - footerHeight)
}).resize();
</script>